package com.chenailin.www.dao;

import com.chenailin.www.pojo.Administrator;
import com.chenailin.www.pojo.Student;
import com.chenailin.www.pojo.User;

import java.sql.*;

public interface PublicDAO {
    // 检查数据库是否存在账户
    boolean hasAccounts() throws SQLException;

    // 查询用户
    User selectUser(int id, int userType) throws SQLException;

    // 导入登录信息
    User buildUser(ResultSet rs, String table) throws SQLException;

    // 添加学生
    boolean addStudent(Student stu) throws SQLException;

    // 添加管理员
    boolean addAdmin(Administrator admin) throws SQLException;

}


































